package com.xinqi.modules.prepare.paper.dto.req;

import com.xinqi.common.green.annotation.Text;
import com.xinqi.modules.prepare.common.PrepareLimitConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 备课区测评卷-请求对象-新增
 *
 * @author: system
 * @date: 2023/03/19
 */
@Data
@Schema(description = "备课区测评卷-随机组题-新增")
public class PrepareExamPaperRandomDTO implements Serializable {

    /**
     * 备课区id
     */
    @Schema(description = "备课区id", example = "", hidden = true)
    @NotNull(message = "备课区id不能为空")
    private Long prepareId;
    /**
     * 备课区文件夹id，如果没有默认为空0
     */
    @Schema(description = "备课区文件夹id，如果没有默认为空0", example = "10001")
    @NotNull(message = "备课区文件夹id不能为空")
    private Long folderId;
    /**
     * 名称
     */
    @Text
    @Schema(description = "名称", example = "语文测评")
    @NotBlank(message = "名称不能为空")
    @Size(max = PrepareLimitConstant.NAME_WORKS_LIMIT, message = "名称不能超过15个字")
    private String name;
    /**
     * 测评卷内容
     */
    @Text
    @Schema(description = "测评卷内容", example = "该测评较难，10道重点题型")
    @Size(max = PrepareLimitConstant.CONTENT_WORKS_LIMIT, message = "内容不能超过300个字")
    private String content;
    /**
     * 题型-数量
     */
    @Schema(description = "题型数量列表")
    @NotEmpty(message = "题型数量列表不能为空")
    @Valid
    private List<QuestionTypeNumDTO> questionTypeNumList;
}
